package ysq.xyg.host.model.po;

import lombok.NoArgsConstructor;

import lombok.Data;
import ysq.xyg.base.util.BaseConstant;
import ysq.xyg.base.util.BaseUtil;
import ysq.xyg.sys.model.po.SysUser;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * 房产模块-提现记录实体类
 *
 * @author shengQiang yu
 * @date 2019-7-7 20:49:44
 */
@Data
@NoArgsConstructor
@Table(name = "xyg_host_withdraw")
public class HostWithdraw implements Serializable{

	/**
     * 主键
     */ 
	@Id
	private String id;
	
	/**
     * 会员id
     */ 
	@Column(name = "member_id")
	private String memberId;
	
	/**
     * 银行卡号
     */ 
	@Column(name = "bank_no")
	private String bankNo;
	
	/**
     * 提现金额
     */ 
	@Column(name = "money")
	private int money;
	
	/**
     * 提现状态:1、待提现，2、提现成功,3、提现失败
     */ 
	@Column(name = "withdrow_status")
	private String withdrowStatus;
	
	/**
     * 提现描述
     */ 
	@Column(name = "result")
	private String result;
	
	/**
     * 删除标识：1、正常，2、已删除
     */ 
	@Column(name = "remove_tag")
	private String removeTag;
	
	/**
     * 创建人
     */ 
	@Column(name = "create_user")
	private String createUser;
	
	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;
	
	/**
     * 修改人
     */ 
	@Column(name = "update_user")
	private String updateUser;
	
	/**
     * 修改时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;
	/**
	 * 卡号
	 */
	@Transient
	private String cardNo;

	/**
	 * 昵称
	 */
	@Transient
	private String nickName;

	/**
	 * 头像
	 */
	@Transient
	private String headImage;

	/**
	 * 手机号
	 */
	@Transient
	private String phone;

	/**
	 * 姓名
	 */
	@Transient
	private String name;
	/**
	 * 提现日期
	 */
	@Transient
	private String createTimeStr;

	public HostWithdraw(SysUser sysUser) {
		this.id= BaseUtil.uId();
		this.removeTag= BaseConstant.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}